import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useDeviceWriterStore = defineStore('device-writer', () => {
  const deviceName = ref('')
  const dataType = ref('')
  const address = ref('')
  const writeValue = ref('')

  function reset() {
    deviceName.value = ''
    dataType.value = ''
    address.value = ''
    writeValue.value = ''
  }

  return { deviceName, dataType, address, writeValue, reset }
})
